<?php
/**
 * Created by PhpStorm.
 * User: qttx
 * Date: 2019/5/31
 * Time: 13:58
 */
namespace app\admin\model;

class InterturnModel extends BaseModel
{
    protected $table = "xst_interturn";
    protected $rule = [
        'id' => '',
    ];
    protected $msg = [
        'id' => '',
    ];
    public function interturn_list()
    {
        $res = $this->field('i.*,u.nickname,s.nickname as to_nickname')->alias('i')->join('xst_user u','i.uid = u.id')->join('xst_user s','i.to_uid = s.id')->order('create_time desc')->paginate(10,false,['query'=>request()->param()]);
        return $res;
    }
    /**
     * 会员转出记录删除
     */
    public function interturn_dell()
    {
        $id = request()->post('id');
        $res = $this->where('id','in',$id)->delete();
        return $res;
    }
}